<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>三元运算符比较最大值</title>
    <script>
        var A = 88;
        var B = 66;
        var C = 28;
        /* 
        var max = A > B ? A : B
        max = max > C ? max : C
        alert(max)
         */

        (A > B ? A : B) > C ? alert(A > B ? A : B) : alert(C)
    </script>
</head>

<body>

</body>

</html>